/// 登录请求模型
class LoginRequest {
  /// 用户名或邮箱
  final String username;
  
  /// 密码
  final String password;
  
  /// 是否记住登录
  final bool rememberMe;
  
  /// 构造函数
  LoginRequest({
    required this.username,
    required this.password,
    this.rememberMe = false,
  });
  
  /// 转换为JSON
  Map<String, dynamic> toJson() {
    return {
      'username': username,
      'password': password,
      'remember_me': rememberMe,
    };
  }
  
  /// 创建一个新的登录请求，复制原有属性并覆盖指定属性
  LoginRequest copyWith({
    String? username,
    String? password,
    bool? rememberMe,
  }) {
    return LoginRequest(
      username: username ?? this.username,
      password: password ?? this.password,
      rememberMe: rememberMe ?? this.rememberMe,
    );
  }
} 